<html><head><title>EscapeString</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">EscapeString()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result$ = <font color="#3A3966"><b>EscapeString</b></font>(String$ [, Mode])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Returns the escaped version of the string. <a href="unescapestring.html">UnescapeString()</a>() can be used to 
do the reverse operation. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>String$</i></td>
<td width="90%"> 
The string to escape. 

</td></tr>
<tr><td><i>Mode (optional)</i></td>
<td> 
The mode to use when escaping the string. 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_String_EscapeInternal</font>: escape the string using PureBasic internal format (see <a href="../reference/general_rules.html">General rules</a>
                             for accepted escape sequences) (default).
  <font color="#924B72">#PB_String_EscapeXML</font>     : escape the string using the XML escape characters. This can be useful to easily put any string in a
                             XML tree.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

An escaped string. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">EscapeString</font>(&quot;Test=&quot;+<font color="#3A3966">Chr</font>(34)+&quot;Hello&quot;+<font color="#3A3966">Chr</font>(34)+&quot;.&quot;) <font color="#3A3966">; Will display &quot;Test=\&quot;Hello\&quot;.&quot;</font>
  <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">EscapeString</font>(&quot;&lt;item&gt;Hello&lt;/item&gt;&quot;, <font color="#924B72">#PB_String_EscapeXML</font>) <font color="#3A3966">; Will display &quot;&amp;lt;item&amp;gt;Hello&amp;lt;/item&amp;gt;&quot;</font>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="unescapestring.html">UnescapeString()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=countstring.html>CountString()</a> - <a href="index.html">String Index</a> - <a href="findstring.html">FindString()</a> -><br><br>

</body></html>